package com.example.mapp;

import com.example.entity.MaintenancePlan;
import com.example.mapp.buildSql.InformationMappSql;
import com.example.mapp.buildSql.MaintenancePlanMappSql;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface MaintenancePlanMapp {

    @SelectProvider(type = MaintenancePlanMappSql.class,method = "queryList")
     List<MaintenancePlan> queryList(MaintenancePlan maintenancePlan) throws Exception;

     @Select(" select * from maintenance_plan where id =#{id}")
     MaintenancePlan queryById(String id) throws  Exception;

     @Delete(" delete from maintenance_plan where id =#{id}")
     int deleteById(String id) throws Exception;

     @Insert(" insert into maintenance_plan (url,discription,start_Date,party_id,plan_start_date,plan_end_date) values (#{url},#{discription},#{startDate},#{partyId},#{planStartDate},#{planEndDate})")
     int insert(MaintenancePlan maintenancePlan) throws Exception;
}
